package com.unipay.spring.controller;

import com.unipay.spring.service.impl.BookService;
import com.unipay.spring.service.impl.CheckoutService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

/**
 * @BelongsProject: SSM
 * @Author: cmy
 * @CreateTime: 2023-01-18  09:56
 * @Description: TODO
 */

@Controller
public class BookController {

    @Autowired
    private BookService bookService;
    @Autowired
    private CheckoutService checkoutService;

    public void buyBook(Integer bookId, Integer userId){
        bookService.buyBook(bookId, userId);
    }
    public void checkout(Integer bookId, Integer userId){
        checkoutService.checkout(bookId, userId);
    }
}
